  @extends('layouts.news')
  @section('content')



<div class="container-fluid">

  <a class="btn btn-primary" href="/news/create">添加文章</a>
   
   @foreach( $data as $val)
  <div class="panel panel-default">
  <div class="panel-body">
    {{$val->title}}
    
    <a href="/news/{{$val->id}}" class="btn btn-info">阅读</a>
    <a href="/news/{{$val->id}}/edit" class="btn btn-info">修改</a>

      <form action="/news/{{$val->id}}" method="post" style="display: inline-block;">
            {{csrf_field()}}
            {{ method_field('DELETE') }}
            <input type="hidden" name="_method" value="DELETE">
            <button type="submit" class="btn btn-danger">删除</button>
        </form>
    </div>
    </div>
    @endforeach

    {!!$data->render() !!}
    


@endsection
  
  
  
  
  